Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a windows specific keepalive function. #1103

Closed

Conversation

michael-grunder
Copy link
Collaborator

While it is possible to toggle SO_KEEPALIVE in windows via
setsockopt, you have to use WSAIoctl to set the interval.

Since WSAIoctl can actually do all of this in one call (toggle the
option, and set the corresponding interval), just use that in Windows
and avoid the call to setsockopt alltogether.

See: #1100

While it is possible to toggle `TCP_KEEPALIVE` in windows via
setsockopt, you have to use `WSAIoctl` to set the interval.

Since `WSAIoctl` can actually do all of this in one call (toggle the
option, and set the corresponding interval), just use that in Windows
and avoid the call to `setsockopt` alltogether.

See: redis#1100
@michael-grunder
Copy link
Collaborator Author

cc @kristjanvalur @bjosv I haven't used a Windows machine in ten years, so if either of you happens to know Windows feel free to let me know if there's something incorrect in this PR.

I just based it on their online docs.

@michael-grunder
Copy link
Collaborator Author

GitHub got confused by this commit. See #1104

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant